<% @page_title="Password Hashes for #{@host.ip_address} in area #{@host.test_area_name}" %>
<% @host_menu=1 %>
<% @select_passwordhashes=1 %>
<% @table = @password_hashes %>
<% @action = "showpasswordhashes" %>
<% @cont = "hosts" %>
<% @url_params = {} %>

<%= render :partial => 'layouts/page_count' %>

<table>
<thead>
  <tr>
    <th scope="col"><%= sort_link("Hash Type", "password_hash_type_name") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:type_v]}", @url_params[:type_v], :type_v, {:controller => @cont}) %>
    </th>

    <th scope="col"><%= sort_link("Username", "username") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:username_v]}", @url_params[:username_v], :username_v, {:controller => @cont}) %>
    </th>

    <th scope="col"><%= sort_link("Hash", "password_hash") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:hash_v]}", @url_params[:hash_v], :hash_v, {:controller => @cont}) %>
    </th>

     <th scope="col"><%= sort_link("Password", "password") %>
      <%= filterx_icon("Remove filter on port #{@url_params[:password_v]}", @url_params[:password_v], :password_v, {:controller => @cont}) %>
    </th>

  </tr>
</thead>

<tbody>
<%
odd_or_even = 0
if @password_hashes.nil? then
%>
No ports found
<% else
	for password_hash in @password_hashes
	    odd_or_even = 1 - odd_or_even
	%>

  <tr class="odd<%=h odd_or_even %>">
    <td><%=h password_hash.password_hash_type_name %></td>
    <td><%=h password_hash.username %></td>
    <td><%=h password_hash.password_hash %></td>
    <td><%=h password_hash.password %></td>
  </tr>
	<% end %>
<% end %>
</tbody>
</table>

<%= render :partial => 'layouts/page_count' %>
